package com.spsoft.workflow.common.enums.bus;

import com.spsoft.workflow.common.WorkFlowConstants;
import com.spsoft.workflow.common.enums.BusFlowTypeEnums;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 下载授信额度流程节点枚举
 *
 * @author cdl
 * @date 2023/12/15
 */
@Getter
@AllArgsConstructor
public enum CreditRollBackNodeEnums {
    /**
     * 提交
     */
    ROOT(WorkFlowConstants.ROOT_EVENT_ID, "提交"),
    /**
     * 审批
     */
    FLOW_THSXED_SP(BusFlowTypeEnums.FLOW_THSXED + "_SP", "审批"),
    /**
     * 退回
     */
    FLOW_THSXED_TH(BusFlowTypeEnums.FLOW_THSXED + "_THSX", "退回");

    private final String code;
    private final String name;

    public static CreditRollBackNodeEnums valueOfCode(String code) {
        for (CreditRollBackNodeEnums value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
